package cn.itcast.hotel.conf;

import org.apache.http.HttpHost;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestHighLevelClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * ClassName: RestHighLevelClient
 * Package: cn.itcast.hotel.conf
 * Description:
 *
 * @Author BuTang
 * @Create 2023/12/16 20:38
 * @Version 1.0
 */
@Configuration
public class RestHighClient {
    @Bean
    public RestHighLevelClient client(){
        return  new RestHighLevelClient(RestClient.builder(
                HttpHost.create("butang.asuscomm.cn:9200")
        ));
    }
}
